﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Protocol.Flowmeter
{
    public class FloatBlock
    {
        /// <summary>
        /// 地址（1字节Hex）
        /// </summary>
        public string Addr { get; set; }

        /// <summary>
        /// 功能码（1字节Hex）
        /// </summary>
        public string FunCode { get; set; }

        /// <summary>
        /// 长度(单位字节)
        /// </summary>
        public int DataLength { get; set; }


        public string DataHex { get; set; }
        public decimal DataValue { get; set; }

        /// <summary>
        /// 数据块
        /// </summary>
        public List<SpecialDataValue> SpecialDataValueList = new List<SpecialDataValue>();
        //public List<TempHumiDataValue> TempHumiDataValueList = new List<TempHumiDataValue>();

        /// <summary>
        /// 
        /// </summary>
        public FloatBlock()
        {
            this.Addr = string.Empty;
            this.FunCode = string.Empty;
            DataLength = 0;
            DataHex = string.Empty;
            DataValue = -1;
        }
    }


    public class SpecialDataValue
    {
        public string DI { get; set; }
        public decimal Value { get; set; }
    }

    public class TempHumiDataValue
    {
        public string DI { get; set; }
        public decimal Value { get; set; }
    }
}
